package com.css.devops.service;

import com.css.devops.domain.BuildMonitor;
import com.css.devops.domain.JobStatistics;
import com.css.devops.domain.PageResult;
import com.css.devops.domain.vo.BuildMonitorQueryCriteria;
import com.fasterxml.jackson.databind.JsonNode;

public interface DevopsBuildMonitor {

	/**
	 * 根据pipeline的id获取构建过程中的各个阶段
	 * @param buildMonitorQueryCriteria
	 * @return
	 */
	PageResult<BuildMonitor> queryBuildMonitor(BuildMonitorQueryCriteria buildMonitorQueryCriteria);

	/**
	 * 根据JsonNode 构建 BuildMonitor
	 * @param node
	 * @return
	 */
	BuildMonitor buildMonitor(JsonNode node);

	/**
	 * 统计job任务的信息
	 * @param jobName
	 * @return
	 */
	JobStatistics statisticsJob(String jobName);
}